import type {
  DoctorPage,
  FollowType,
  KnowledgePage,
  KnowledgeParams,
  PageParams,
  TopDep
} from '@/types/consult'
import { request } from '@/utils/request'

// 获取首页文章列表
export const getKnowledgeList = (pramas: KnowledgeParams) =>
  request<KnowledgePage>('/patient/home/knowledge', 'GET', pramas)

// 获取关注医生列表
export const getDoctorList = (pramas: PageParams) =>
  request<DoctorPage>('/home/page/doc', 'GET', pramas)

// 关注和取消关注
export const followDoctor = (id: string, type: FollowType) => request('/like', 'POST', { id, type })

// 获取科室列表数据
export const getAllDep = () => request<TopDep[]>('/dep/all', 'GET')
